﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TA.DotNetUtils;

public static class _CharExtensions
{
	public static bool IsVowel(this char cThis)
	{
		return "euioa".Contains(cThis);
	}
	public static bool IsConsonant(this char cThis)
	{
		return !"euioa".Contains(cThis);
	}
	public static Tuple<char, bool> PickNext(this char This, bool digits)
	{
		if (This >= 'a' && This < 'z')
			return new Tuple<char, bool>(++This, false);
		else if (This == 'z')
			return new Tuple<char, bool>('A', false);
		else if (This >= 'A' && This < 'Z')
			return new Tuple<char, bool>(++This, false);
		else if (This == 'Z')
		{
			if (digits)
				return new Tuple<char, bool>('0', false);
			else
				return new Tuple<char, bool>('a', true);
		}
		else if (This >= '0' && This < '9')
			return new Tuple<char, bool>(++This, false);
		else if (This == '9')
			return new Tuple<char, bool>('a', true);
		else
			return new Tuple<char, bool>('a', false);

	}
}
